package com.ruoyi.web.controller.system;


import com.ruoyi.common.core.page.ResponseResult;
import com.ruoyi.system.domain.Cash;
import com.ruoyi.system.domain.MerchantCount;
import com.ruoyi.system.service.MerchantCountService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Api(tags = "管理后台:统计商户数据")
@RestController
@RequestMapping("/admin/merchantCount")
public class AdminMerchantCountController extends AdminController {
    @Resource
    private MerchantCountService userChannelService;


    @ApiOperation(value = "列表")
    @GetMapping("list")
    public ResponseResult<List<Cash>> list(MerchantCount userChannel) {
        this.checkAdmin();
        this.startPage();
        List<MerchantCount> list = userChannelService.findList(userChannel);
        return this.setSuccessResult(this.getPageResult(list));
    }


}
